var app = getApp()
var myhost = app.globalData.myhost
Component({
  data: {},
  properties: {
    typebang: {
      type: String
    },
    booklist:{
      type: Object,
      default: []
    }
  },
  methods: {
    //书籍详情
    detail: function (e) {
      // console.log(e[0])
      var bookid=e[0].id
      wx.navigateTo({
        url: '/pages/detail/detail?bookid=' + bookid,
      })
    },
    click: function (e) {
      var bookname=e.currentTarget.dataset.bookname
      console.log(bookname)
      wx.request({
        url: myhost+'/book/bookOfName?name='+bookname,
        success:(res)=>{
          // console.log(res.data)
          this.detail(res.data)
        }
      })
    }
  },
  
})